class PatientsAndOrderExaminations < ActiveRecord::Migration
  def self.up
    create_table :order_examinations do |t|
      t.integer  :examination_number
      t.datetime :created_at
      t.datetime :updated_at
      t.integer  :patient_id
      t.integer  :examination_type_id
    end
    
    create_table :patients do |t|
      t.string   :name
      t.string   :surname
      t.string   :pesel
      t.string   :email_address
      t.string   :address
      t.integer  :phone
      t.datetime :created_at
      t.datetime :updated_at
      t.integer  :user_id
    end
  end

  def self.down
    drop_table :order_examinations
    drop_table :patients
  end
end
